//
//  DSZShowViewController.m
//  7.13苏宁框架
//
//  Created by lovena on 15/7/14.
//  Copyright (c) 2015年 lovena. All rights reserved.
//

#import "DSZShowViewController.h"
#import "DSZShowTabbarView.h"
#import "DSZMainViewController.h"
@interface DSZShowViewController ()

@end

@implementation DSZShowViewController
-(void)loadView
{
    [super loadView];
    [self initSubTabbars];
}
- (void)viewDidLoad {
  
    [super viewDidLoad];
//    [self initSubTabbars];
    self.tabBar.hidden=YES;
    
}
-(void)initSubTabbars
{
    //位置大小
    _tabbarView=[[DSZShowTabbarView alloc]initWithFrame:CGRectZero];
    _tabbarView.frame=CGRectMake(0, 480-49, 320, 49);
    _tabbarView.delegate=self;
    
    [self.view addSubview:_tabbarView];
}
//代理/Users/app05/Desktop/7 .25苏宁框架/7.13苏宁框架/Images.xcassets/下拉/down8.imageset/down8.png
-(void)didselectedView:(NSInteger)index
{
    self.selectedIndex=index;
}

//返回主页
- (IBAction)returnMain:(id)sender {
    [self.navigationController popViewControllerAnimated:YES];
    [self hiddenShowTabbar:YES];
    //主页分栏出现
    DSZMainViewController *main=(DSZMainViewController*)self.tabBarController;
    [main hiddenMainTabbar:NO];
    
}
//隐藏分栏
-(void)hiddenShowTabbar:(BOOL)flag
{
    if(flag==YES)
    {
        
//        _tabbarView.frame=CGRectMake(0, 480, 320, 49);
        _tabbarView.hidden = YES;
    }
    else
    {
       //_tabbarView.frame=CGRectMake(0, 480-49, 320, 49);
        _tabbarView.hidden = NO;
    }
}
@end
